package com.es.www.kyl.service.mapstruct;

import com.es.www.kyl.bean.res.client.QuestionCompletionVO;
import com.es.www.kyl.bean.res.web.CategoryVO;
import com.es.www.kyl.domain.Category;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * @author Estranger
 * @date 2025/8/4
 * description
 */
@Mapper
public interface CategoryMapConstruct {

	CategoryMapConstruct INSTANCE = Mappers.getMapper(CategoryMapConstruct.class);

	List<CategoryVO> toCategoryVOList(List<Category> categoryList);

	@Mappings({
			@Mapping(target = "categoryId", source = "id"),
			@Mapping(target = "categoryName", source = "name"),
			@Mapping(target = "style", source = "style")
	})
	QuestionCompletionVO toQuestionCompletionVO(Category category);


	List<QuestionCompletionVO> toQuestionCompletionVOList(List<Category> categoryList);
}
